//
//  ViewController.m
//  APParking
//
//  Created by Apple on 2019/2/12.
//  Copyright © 2019年 pakeyin. All rights reserved.
//

#import "ViewController.h"
#import "UIViewController+CWLateralSlide.h"
#import "LeftViewController.h"
#import "TestViewController.h"
//#import "CWScrollView.h"
//#import "CWTableViewInfo.h"


@interface ViewController ()
//@property (nonatomic,strong) NSArray *titleArray;
//@property (nonatomic,strong) NSArray *selArray;
//@property (nonatomic,strong) NSMutableArray *tableViewInfonArray;
//
//@property (nonatomic,weak) CWScrollView * contentScrollView;
@property (nonatomic,strong) LeftViewController *leftVC; // 强引用，可以避免每次显示抽屉都去创建

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"AP泊车";
    self.view.backgroundColor = [UIColor orangeColor];
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName: [UIFont fontWithName:@"Helvetica" size: 19],NSForegroundColorAttributeName: [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]}];
    
    UIBarButtonItem *leftLtem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(tapBarButton)];
    self.navigationItem.leftBarButtonItem = leftLtem;
    
//    UINavigationBar * nav = [UINavigationBar appearance];
//    [nav setTitleTextAttributes:@{NSFontAttributeName: [UIFont fontWithName:@"Helvetica" size: 19],NSForegroundColorAttributeName: [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]}];
    


}

- (void)tapBarButton {
    // 自己随心所欲创建的一个控制器
//    LeftViewController *leftVC = [[LeftViewController alloc] init];
    TestViewController *leftVC = [[TestViewController alloc] init];
    // 调用这个方法
    [self cw_showDrawerViewController:leftVC animationType:CWDrawerAnimationTypeMask configuration:nil];
}


//#pragma mark - 自定义处理手势冲突接口
//#if 0
//- (BOOL)cw_gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
//    return YES;// 可以在这里实现自己需要处理的手势冲突逻辑
//}
//#endif

@end
